* Software version: Stata 17 (Parallel Edition)

use "supreme court mood replication.dta"

*Dickey-Fuller tests
**without drift
dfuller mood

dfuller caselaw

dfuller policy

dfuller unemployment

dfuller inflation

**with drift
dfuller mood, drift

dfuller caselaw, drift

dfuller policy, drift

dfuller unemployment, drift

dfuller inflation, drift


*Johansen rank test
**determine lag order with trend
varsoc mood caselaw policy inflation unemployment, exog(year)

**determine lag order without trend
varsoc mood caselaw policy inflation unemployment

**rank test
vecrank mood caselaw policy inflation unemployment, lag(2) max 


